class Person {
    readonly friend?: Person
    readonly name: string
    age!: number
    constructor(name: string, friend?: Person) {
        this.name = name
        this.friend = friend
    }
}
const p = new Person('why', new Person('ABCS'))
console.log(p.name)
console.log(p.friend)
// p.friend ?.name = 'JAMES'
if (p.friend) {
    p.friend.age = 30
}
export {}